package com.xuqing.autohelper;

import android.os.Bundle;
import android.widget.Toast;

import com.xuqing.autohelpertesting.AutoHelperTesting;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {
    
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        //TEST 测试自动测试程序 begin
        AutoHelperTesting.getInstance().startTesting(this, new MainActivityTesting());
        findViewById(R.id.test).setOnClickListener(v -> Toast.makeText(this, "点击了按钮", Toast.LENGTH_SHORT).show());
        //TEST 测试自动测试程序 end
        //TEST 测试自定义自动执行 begin
        /*AutoHelper.getInstance().executeStep(this, ScriptManager.getStepBack());
        AutoHelper.getInstance().setOnStepListener(new OnStepListener() {
            @Override
            public void onStart(StepCallbackBean stepCallbackBean) throws Exception {}
            
            @Override
            public void onStepScriptExecuteFinish(StepCallbackBean stepCallbackBean) throws Exception {}
            
            @Override
            public void onStepDataCallback(StepCallbackBean stepCallbackBean) throws Exception {}
            
            @Override
            public void onError(StepCallbackBean stepCallbackBean) throws Exception {}
            
            @Override
            public StepCallbackBean onSyncCallback(StepCallbackBean stepCallbackBean) throws Exception {
                stepCallbackBean.setMessage("test");
                return stepCallbackBean;
            }
            
            @Override
            public void onAsyncCallback(StepCallbackBean stepCallbackBean) throws Exception {
            
            }
        });*/
        //TEST 测试自定义自动执行 end
    }
}